import { request } from './request'
// 获取最新mv
export function _getNewMV (limit) {
  return request({
    url: '/mv/first',
    params: {
      limit: limit
    }
  })
}
// 获取最热mv
export function _getTopMv (limit = 10) {
  return request({
    url: '/top/mv',
    params: {
      limit: limit
    }
  })
}
export class MV {
  constructor (id, cover, name, artist, count) {
    this.id = id
    this.cover = cover
    this.name = name
    this.artist = artist
    this.count = count
  }
}
// 获取mv细节
export function _getMvDetail (id) {
  return request({
    url: '/mv/detail',
    params: {
      mvid: id
    }
  })
}
// 获取视频地址
export function _getMVUrl (id) {
  return request({
    url: '/mv/url',
    params: {
      id: id
    }
  })
}
// 获取mv评论
export function _getMVComment (id, limit) {
  return request({
    url: '/comment/mv',
    params: {
      id: id,
      limit: limit
    }
  })
}
// 获取mv相关推荐
export function _getSimiMv (id) {
  return request({
    url: '/simi/mv',
    params: {
      mvid: id
    }
  })
}
// 获取所有mv
export function _AllMv (area = '全部', type = '全部', order = '最新', limit) {
  return request({
    url: '/mv/all',
    params: {
      area: area,
      type: type,
      order: order,
      limit: limit
    }
  })
}
